export const TERM_MONTHLY = 'TERM_MONTHLY';
export const TERM_ANNUALLY = 'TERM_ANNUALLY';
export const TERM_BIENNIALLY = 'TERM_BIENNIALLY'; //2y
export const TERM_TRIENNIALLY = 'TERM_TRIENNIALLY'; //3y
export const TERM_QUADRENNIALLY = 'TERM_QUADRENNIALLY'; //4y
export const TERM_QUINQUENNIALLY = 'TERM_QUINQUENNIALLY'; //5y
export const TERM_SEXENNIALLY = 'TERM_SEXENNIALLY'; //6y
export const TERM_SEPTENNIALLY = 'TERM_SEPTENNIALLY'; //7y
export const TERM_OCTENNIALLY = 'TERM_OCTENNIALLY'; //8y
export const TERM_NOVENNIALLY = 'TERM_NOVENNIALLY'; //9y
export const TERM_DECENNIALLY = 'TERM_DECENNIALLY'; //10y
export const TERM_CENTENNIALLY = 'TERM_CENTENNIALLY'; //100y

export const TERMS_LIST = < const >[
	TERM_MONTHLY,
	TERM_ANNUALLY,
	TERM_BIENNIALLY,
	TERM_TRIENNIALLY,
	TERM_QUADRENNIALLY,
	TERM_QUINQUENNIALLY,
	TERM_SEXENNIALLY,
	TERM_SEPTENNIALLY,
	TERM_OCTENNIALLY,
	TERM_NOVENNIALLY,
	TERM_DECENNIALLY,
	TERM_CENTENNIALLY,
];

export type UrlFriendlyTermType =
	| 'monthly'
	| 'yearly'
	| '2yearly'
	| '3yearly'
	| '4yearly'
	| '5yearly'
	| '6yearly'
	| '7yearly'
	| '8yearly'
	| '9yearly'
	| '10yearly'
	| '100yearly';

export const URL_FRIENDLY_TERMS_MAPPING: Record<
	UrlFriendlyTermType,
	( typeof TERMS_LIST )[ number ]
> = {
	monthly: TERM_MONTHLY,
	yearly: TERM_ANNUALLY,
	'2yearly': TERM_BIENNIALLY,
	'3yearly': TERM_TRIENNIALLY,
	'4yearly': TERM_QUADRENNIALLY,
	'5yearly': TERM_QUINQUENNIALLY,
	'6yearly': TERM_SEXENNIALLY,
	'7yearly': TERM_SEPTENNIALLY,
	'8yearly': TERM_OCTENNIALLY,
	'9yearly': TERM_NOVENNIALLY,
	'10yearly': TERM_DECENNIALLY,
	'100yearly': TERM_CENTENNIALLY,
};

export const PLAN_MONTHLY_PERIOD = 31;
export const PLAN_ANNUAL_PERIOD = 365;
export const PLAN_BIENNIAL_PERIOD = 730;
export const PLAN_TRIENNIAL_PERIOD = 1095;
export const PLAN_QUADRENNIAL_PERIOD = 1460;
export const PLAN_QUINQUENNIAL_PERIOD = 1825;
export const PLAN_SEXENNIAL_PERIOD = 2190;
export const PLAN_SEPTENNIAL_PERIOD = 2555;
export const PLAN_OCTENNIAL_PERIOD = 2920;
export const PLAN_NOVENNIAL_PERIOD = 3285;
export const PLAN_DECENNIAL_PERIOD = 3650;
export const PLAN_CENTENNIAL_PERIOD = 36500;

export const PERIOD_LIST = < const >[
	PLAN_MONTHLY_PERIOD,
	PLAN_ANNUAL_PERIOD,
	PLAN_BIENNIAL_PERIOD,
	PLAN_TRIENNIAL_PERIOD,
	PLAN_QUADRENNIAL_PERIOD,
	PLAN_QUINQUENNIAL_PERIOD,
	PLAN_SEXENNIAL_PERIOD,
	PLAN_SEPTENNIAL_PERIOD,
	PLAN_OCTENNIAL_PERIOD,
	PLAN_NOVENNIAL_PERIOD,
	PLAN_DECENNIAL_PERIOD,
	PLAN_CENTENNIAL_PERIOD,
];
